Telegram Group & Telegram Channel
Что за ошибка в приведенном ниже коде и как ее исправить?

Последним аргументом memset должен быть sizeof(*bar), а не sizeof(bar). sizeof(bar) вычисляет размер bar (то есть самого указателя), а не размер структуры, на которую указывает bar. Поэтому код можно исправить, используя sizeof(*bar) в качестве последнего аргумента вызова memset.

➡️ @cpp_geek



tg-me.com/cpp_geek/270
Create:
Last Update:

Что за ошибка в приведенном ниже коде и как ее исправить?

Последним аргументом memset должен быть sizeof(*bar), а не sizeof(bar). sizeof(bar) вычисляет размер bar (то есть самого указателя), а не размер структуры, на которую указывает bar. Поэтому код можно исправить, используя sizeof(*bar) в качестве последнего аргумента вызова memset.

➡️ @cpp_geek

BY C++ geek




Share with your friend now:
tg-me.com/cpp_geek/270

View MORE
Open in Telegram


C geek Telegram | DID YOU KNOW?

Date: |

The seemingly negative pandemic effects and resource/product shortages are encouraging and allowing organizations to innovate and change.The news of cash-rich organizations getting ready for the post-Covid growth economy is a sign of more than capital spending plans. Cash provides a cushion for risk-taking and a tool for growth.

What is Telegram Possible Future Strategies?

Cryptoassets enthusiasts use this application for their trade activities, and they may make donations for this cause.If somehow Telegram do run out of money to sustain themselves they will probably introduce some features that will not hinder the rudimentary principle of Telegram but provide users with enhanced and enriched experience. This could be similar to features where characters can be customized in a game which directly do not affect the in-game strategies but add to the experience.

C geek from kr


Telegram C++ geek
FROM USA